
//获取应用实例
const app = getApp()
// 引入要用到的js
import {network} from "../../utils/network.js"
Page({
  data: {
   
  },
  // 生命周期函数-监听页面加载
  onLoad: function (options) {
    var that =this ;
    // 电影的数据
    network.getMovieList({
      success:function(movies){
        that.setData({
          movies: movies
        })
      }
    });
    // 电视剧的数据
    network.getTvsList({
      success:function(tvs){
        that.setData({
          tvs: tvs
        })
      }
    });
    // 综艺数据
    network.getShowsList({
      success: function (shows) {
        that.setData({
          shows: shows
        })
      }
    })
  
  }  
})
